<script>
import api from "@/api";

export default {
  name: "index",
  data() {
    return {
      detail: null
    }
  },
  mounted() {
    this.fetchData()
  },
  methods: {
    async fetchData() {
      let result = await api.xing_zheng_gong_kai_detail({
        id: this.$route.query.id
      })
      console.log('>>>>>>>>>>>result',result)
      this.detail = result;
    }
  }
}
</script>

<template>
  <div class="bg-white text-sm text-gray-600">
    <div style="border: 1px solid dodgerblue;background: #6495ed14" class="p-5">
      <el-row >
        <el-col :span="24" class="my-2">
          <div><span style="width: 100px;display: inline-block;text-align-last: justify;" class="pr-5">名称:</span>{{detail.title||'--'}}</div>
        </el-col>
        <el-col :span="12" class="my-2">
          <div><span style="width: 100px;display: inline-block;text-align-last: justify;" class="pr-5">索引号:</span>{{detail.indexNo||'--'}}</div>
        </el-col>
        <el-col :span="12" class="my-2">
          <div><span style="width: 100px;display: inline-block;text-align-last: justify;" class="pr-5">发布机构:</span>{{detail.department||'--'}}</div>
        </el-col>
        <el-col :span="12" class="my-2">
          <div><span style="width: 100px;display: inline-block;text-align-last: justify;" class="pr-5">发文字号:</span>{{detail.article_no||'--'}}</div>
        </el-col>
        <el-col :span="12" class="my-2">
          <div><span style="width: 100px;display: inline-block;text-align-last: justify;" class="pr-5">主题:</span>{{detail.sub_title||'--'}}</div>
        </el-col>
        <el-col :span="12" class="my-2">
          <div><span style="width: 100px;display: inline-block;text-align-last: justify;" class="pr-5">成文日期:</span>{{detail.createdAt||'--'}}</div>
        </el-col>
        <el-col :span="12" class="my-2">
          <div><span style="width: 100px;display: inline-block;text-align-last: justify;" class="pr-5">发文日期:</span>{{detail.updatedAt||'--'}}</div>
        </el-col>
      </el-row>
    </div>
    <div>
      <div class="text-center text-3xl  text-black py-3">{{detail.title}}</div>
      <div v-html="detail.content" class="py-3 text-xl"></div>
    </div>

  </div>
</template>

<style scoped>

</style>
